DEFINITION FOR C MODULE PrtGfx ;

FROM SYSTEM IMPORT ADDRESS ;

TYPE
  colorEntryPtr = POINTER TO colorEntryPtr ;
  PrtInfoPtr	= POINTER TO PrtInfo ;

CONST
  PCMYELLOW	= 0 ;		(* byte index for yellow  *)
  PCMMAGENTA	= 1 ;		(* byte index for magenta *)
  PCMCYAN	= 2 ;		(* byte index for cyan 	  *)
  PCMBLACK	= 3 ;		(* byte index for black   *)
  PCMBLUE	= PCMYELLOW  ;	(* byte index for blue    *)
  PCMGREEN	= PCMMAGENTA ;	(* byte index for green   *)
  PCMRED	= PCMCYAN    ;	(* byte index for red	  *)
  PCMWHITE	= PCMBLACK   ;	(* byte index for white	  *)

TYPE
  colorEntry = RECORD
    CASE :LONGINT OF
    |0: colorLong  : LONGINT ; (* quick access to all of YMCB *)
    |1: colorByte  : ARRAY [0..3] OF SHORTCARD ; (* 1 entry for each of YMCB *)
    |2: colorSByte : ARRAY [0..3] OF SHORTINT  ; (* ditto (except signed)    *)
    END ;
  END ;

TYPE (* printer info *)
  PrtInfo = RECORD
     pi_render		: ADDRESS ;	  (* PRIVATE - DO NOT USE! *)
     pi_rp		: ADDRESS ;	  (* PRIVATE - DO NOT USE! *)
     pi_temprp		: ADDRESS ;	  (* PRIVATE - DO NOT USE! *)
     pi_RowBuf		: ADDRESS ;	  (* PRIVATE - DO NOT USE! *)
     pi_HamBuf		: ADDRESS ;	  (* PRIVATE - DO NOT USE! *)
     pi_ColorMap	: colorEntryPtr ; (* PRIVATE - DO NOT USE! *)
     pi_ColorInt	: colorEntryPtr ; (* color intensities for *)
     					  (* entire row		   *)
     pi_HamInt		: colorEntryPtr ; (* PRIVATE - DO NOT USE! *)
     pi_Dest1Int	: colorEntryPtr ; (* PRIVATE - DO NOT USE! *)
     pi_Dest2Int	: colorEntryPtr ; (* PRIVATE - DO NOT USE! *)

     pi_ScaleX		: ADDRESS  ;	(* array of scale values for X	*)
     pi_ScaleXAlt	: ADDRESS  ;	(* PRIVATE - DO NOT USE!	*)
     pi_dmatrix		: ADDRESS  ;	(* pointer to dither matrix	*)
     pi_TopBuf		: ADDRESS  ;	(* PRIVATE - DO NOT USE!	*)
     pi_BotBuf		: ADDRESS  ;	(* PRIVATE - DO NOT USE!	*)

     pi_RowBufSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_HamBufSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_ColorMapSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_ColorIntSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_HamIntSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_Dest1IntSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_Dest2IntSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_ScaleXSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_ScaleXAltSize	: CARDINAL ;	(* PRIVATE - DO NOT USE! *)

     pi_PrefsFlags	: BITSET   ;	(* PRIVATE - DO NOT USE! *)
     pi_special		: LONGINT  ;	(* PRIVATE - DO NOT USE! *)
     pi_xstart		: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_ystart		: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_width		: CARDINAL ;	(* source width in pixels*)
     pi_height		: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_pc		: LONGINT  ;	(* PRIVATE - DO NOT USE! *)
     pi_pr		: LONGINT  ;	(* PRIVATE - DO NOT USE! *)
     pi_ymult		: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_ymod		: CARDINAL ;	(* PRIVATE - DO NOT USE! *)
     pi_ety		: INTEGER  ;	(* PRIVATE - DO NOT USE! *)
     pi_xpos		: CARDINAL ;	(* offset to start printing picture *)
     pi_threshold	: CARDINAL ;	(* threshold value (from prefs)	    *)
     pi_tempwidth	: CARDINAL ;	(* PRIVATE - DO NOT USE!	    *)
     pi_flags		: BITSET   ;	(* PRIVATE - DO NOT USE!	    *)
  END ;

END PrtGfx.
